// import TableItemSwitch from './tableItemSwitch.vue'

import { h } from 'vue';

export const columns = [
  {
    type: 'selection',
    key: 'selection',
  },
  {
    title: '提现ID',
    key: 'id',
    width: 80,
  },
  {
    title: '用户ID',
    key: 'userId',
    width: 100,
  },
  {
    title: '主播',
    key: 'isAnchor',
    width: 50,
    render(row) {
      return h(
        'span',
        { style: row.isAnchor == 1 ? 'color:orange' : '' },
        {
          default: () => (row.isAnchor == 1 ? '是' : '否'),
        }
      );
    },
  },
  {
    title: '角色ID',
    key: 'roleId',
    width: 150,
  },
  {
    title: '累计充值金额',
    key: 'totalRechargeAmount',
    width: 100,
  },
  {
    title: '提现金额',
    key: 'amount',
    width: 90,
    render(row) {
      return h(
        'span',
        { style: row.amount < 1000 ? 'color:green' : 'color:red' },
        {
          default: () => (row.amount),
        }
      );
    },
  },
  {
    title: '姓名',
    key: 'name',
    width: 100,
  },
  {
    title: '角色名称',
    key: 'roleName',
    width: 180,
  },
  {
    title: '角色等级',
    key: 'roleLevel',
    width: 90,
  },
  {
    title: '注册日期',
    key: 'registTime',
    width: 156,
  },
  {
    title: '提现方式',
    key: 'payWay',
    width: 80,
    render(row) {
      return h(
        'span',
        { style: row.payWay == 'wechat' ? 'color:green' : 'color:blue' },
        {
          default: () => (row.payWay == 'wechat' ? '微信' : row.payWay == 'alipay' ? '支付宝' : '未知'),
        }
      );
    },
  },
  {
    title: '活动类型',
    key: 'type',
    width: 100,
    render(row) {
      return h(
        'span',
        { style: row.type == 'SLV' ? 'color:orange' : 'color:blue' },
        {
          default: () => {
            let text = '等级红包';
            if(row.type == 'SLV'){
              text = '等级冲刺';
            } else if(row.type == 'HLV'){
              text = '高级红包';
            }
            return text;
          },
        }
      );
    },
  },
  {
    title: '累计提现金额',
    key: 'totalReflectAmount',
    width: 150,
    render(row) {
      return h(
        'span',
        { style: 'color:red' },
        {
          default: () => (row.totalReflectAmount),
        }
      );
    },
  },
  {
    title: '提现状态',
    key: 'status',
    width: 100,
    render(row) {
      return h(
        'span',
        { style: row.status == 'true' ? 'color:green' : 'color:red' },
        {
          default: () => (row.status == 'true' ? '已通过' : row.status == 'reject' ? '已驳回' : '待审核'),
        }
      );
    },
  },
  {
    title: '提现日期',
    key: 'createTime',
    width: 156,
  },
  {
    title: '注册渠道',
    key: 'chanName',
    width: 150,
  },
  {
    title: '游戏区服',
    key: 'areaName',
    width: 100,
  },
  {
    title: '最后登录时间',
    key: 'lastLoginTime',
    width: 156,
  },
  {
    title: '最后提现时间',
    key: 'lastReflectTime',
    width: 156,
  },
  {
    title: '订单号',
    key: 'orderNo',
    width: 238,
  },
];
